package cn.blossoming.service.dto;

import cn.blossoming.dao.domain.UserEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User implements Serializable {

    private Integer id;
    private String name;
    private String phone;
    private String signature;
    private String avatar;
    private Integer tipsNum;
    private Integer videoNum;
    private Integer fansNum;
    private Integer followNum;
    private UserEntity.Type type;
    private Integer state;
    private String remark;

    public User(UserEntity entity) {
        this.id = entity.getId();
        this.name = entity.getName();
        this.phone = entity.getPhone();
        this.signature = entity.getSignature();
        this.avatar = entity.getAvatar();
        this.tipsNum = entity.getTipsNum();
        this.videoNum = entity.getVideoNum();
        this.fansNum = entity.getFansNum();
        this.followNum = entity.getFollowNum();
        this.type = entity.getType();
        this.state = entity.getState();
        this.remark = entity.getRemark();
    }

    private List<Tips> tips;

    private List<TipsComment> tipsComments;

    private List<TipsPraise> tipsPraises;


    private List<TipsRead> tipsReads;


    private List<UserFans> userFans;


    private List<UserFans> userFollows;


    private List<Video> videos;


    private List<VideoComment> videoComments;


    private List<VideoPraise> videoPraises;


    private List<VideoRead> videoReads;

}
